-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(reactive): fix issue when using reactive array
in the template
#532
Conversation
b.list[0].count.value === 0 // true | ||
``` | ||
|
||
</details> | ||
|
||
<details> | ||
<summary> | ||
✅ <b>Should</b> always use <code>ref</code> in a <code>reactive</code> when working with <code>Array</code> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, do you mean "If you need to use ref in Array, wrap it with reactive
"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the message we had before :D
https://github.com/vuejs/composition-api/tree/556292d0d60220722fac2cd401b1ba061d6b05ba#ref-unwrap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a native English speaker, which statement makes more sense to you? We can improve other statements along the way.
expect(JSON.parse(vm.$el.textContent)).toStrictEqual([{ value: 1 }]) | ||
}) | ||
|
||
// TODO make this pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Planned to support it in this PR or another?
fix #524
Readded the recommendation of using
ref([])
instead ofreactive([])
, becausereactive([])
doesn't work well withcomputed
atm